package STUDENT.HOANGQUOCVIET.OOPs.SWING;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;

import JAVACORE_TRAINING.OOPs.JSON_MODULES.OPTIONS_DEMO.JACKSONJSON.demo;
public class Demo extends JFrame implements ActionListener {
	public Demo(){
		this.setTitle("Demo");
		this.setSize(300, 300);		
		this.setDefaultCloseOperation(EXIT_ON_CLOSE);
		
		JLabel label = new JLabel("Số A");
		add(label, "North", 0);
		
		JTextField jtxt= new JTextField();
		add(jtxt, "North", 0);
		
		JLabel label1 = new JLabel("Số A");
		add(label1, "North", 0);
		
		JTextField jtxt1= new JTextField();
		add(jtxt1, "Center", 1);
		
		JButton button = new JButton("Nút");
		add(button,"South", 0);
		button.addActionListener(this);
	}
	public static void main(String[] args) {
		Demo Demo1 = new Demo();
		Demo1.setVisible(true);
	}
	@Override
	public void actionPerformed(ActionEvent e) {
		JOptionPane.showMessageDialog(null,"Hello!");
		
	}

}
